package com.asiainfo.wx.portal;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * Copyright: Copyright (c) 2019  zteits
 *
 * @ClassName: com.asiainfo.wx.portal
 * @Description:
 * @version: v1.0.0
 * @author: atao
 * @date: 2019-11-04   21:54
 * Modification History:
 * Date         Author          Version      Description
 * ---------------------------------------------------------*
 * 2019-11-04      atao          v1.0.0          创建
 */
public class BaseController {

    @Autowired
    private HttpServletRequest request;


    protected String getBaseUrl(){
        return  request.getScheme()+"://"+request.getServerName();
    }

    protected String getWxRedirectURI(String path){
        return getBaseUrl()+path;
    }
}
